package com.yfq.gateway.apigatewaysdk.config;

import com.yfq.gateway.apigatewaysdk.application.GatewaySdkInterfaceRegister;
import com.yfq.gateway.apigatewaysdk.domain.service.GatewayCenterService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author yfq
 * @date 2024/1/5 14:11
 * @description
 */
@EnableConfigurationProperties(GatewaySdkProperties.class)
public class GatewaySdkAutoConfiguration {

    @Bean
    public GatewaySdkInterfaceRegister gatewaySdkInterfaceRegister(GatewaySdkProperties gatewaySdkProperties, GatewayCenterService gatewayCenterService) {
        return new GatewaySdkInterfaceRegister(gatewaySdkProperties, gatewayCenterService);
    }

    @Bean
    public GatewayCenterService gatewayCenterService(GatewaySdkProperties gatewaySdkProperties) {
        return new GatewayCenterService(gatewaySdkProperties);
    }
}
